package com.shang.sync.demo;

public class User {
    //柜子
    private Cabinet cabinet;
    //存储的数字
    private int number;

    //构造方法
    public User(Cabinet cabinet, int number) {
        this.cabinet = cabinet;
        this.number = number;
    }

    //使用柜子的方法
    public void userCabinet(){
        cabinet.setNumber(number);
    }
}
